home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / blitz-list200994.lha / blitz-list / 000193_blitz-list-request_Thu Aug 11 13:01:47 1994.msg < prev    next >
Internet Message Format  |  1994-09-20  |  1KB

  1. Received: from gate.ggr.co.uk (gate.ggr.co.uk [193.128.25.10]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id MAA18214 for <blitz-list@helsinki.fi>; Thu, 11 Aug 1994 12:59:34 +0300
  2. Received: from mailhub.ggr.co.uk by gate.ggr.co.uk; Thu, 11 Aug 1994 10:58:05 +0100
  3. Message-Id: <7454.199408110953@mailhub.ggr.co.uk>
  4. Received: from UKSYSA.ggr.co.uk by mailhub.ggr.co.uk; Thu, 11 Aug 1994 10:53:15 +0100
  5. From: Mr M L Funnell <mlf27308@ggr.co.uk>
  6. Date: 11 Aug 94 10:46:00 BST
  7. Subject: Cool way to swap...
  8. To: blitz-list@helsinki.fi
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset="us-ascii"
  11. Content-Transfer-Encoding: 7bit
  12. X-Status: 
  13. Status: RO
  14.  
  15.  
  16. hi there,
  17.  
  18.         just seen swapping routine in a PC Visual Basic manual at work and
  19. wondered if anyone else knew of the routine.....
  20.  
  21. NORMAL SWAP                             Cool Swap
  22. -----------                             ---------
  23.  
  24.         temp = a                        a = a xor b
  25.         b = a                           b = b xor a
  26.         a = temp                        a = a xor b
  27.  
  28.  
  29. This new routine actually gets rid of the 3rd variable and 'could' reduce
  30. the processing time?? I problem is is that it can only work on numbers NOT
  31. strings - or could it? - who knows, who cares!
  32.  
  33.  
  34.  
  35.